<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
	<div id="good_location_main">
	
		<div>
	    	<el-breadcrumb separator-class="el-icon-arrow-right">
			  <el-breadcrumb-item>仓库管理</el-breadcrumb-item>
			  <el-breadcrumb-item>物资阀值设定</el-breadcrumb-item>
			</el-breadcrumb>
			<el-button  type="primary" plain id="user_controller_btn" style="display:none;">
			   关闭popover
			</el-button>
		</div>
		<br/>
		
		<!-- form start -->
			<el-form :inline="true" :model="goodsLocation" class="demo-form-inline">
			  <el-form-item label="仓库货位地址">
			    <el-select v-model="goodsLocation.id" placeholder="仓库货位地址">
			      <el-option v-for="lo in locations" :label="lo.locationName" :value="lo.id" :key="lo.id"></el-option>
			    </el-select>
			  </el-form-item>
			  <div class="submitBtn">
			    <el-button type="primary" @click="onQueryForBtn" :loading="queryBtn">查询</el-button>
			  </div>
			</el-form>
		<!-- form end -->
		
		<el-tag style="width:100%;">货位物资表格</el-tag>
		
		<!-- table start -->
			<template>
			  <el-table
			    :data="tableData"
			    style="width: 100%">
			    <el-table-column
			      label="商品 ID"
			      prop="id">
			    </el-table-column>
			    <el-table-column
			      label="商品名称"
			      prop="goodsName">
			    </el-table-column>
			    <el-table-column
			      label="描述"
			      prop="goodsDesc">
			    </el-table-column>
			    <el-table-column
			      label="数量"
			      prop="goodsNum">
			    </el-table-column>
			    <el-table-column
			      label="货位"
			      prop="locationName">
			    </el-table-column>
			    
			    <el-table-column
				      fixed="right"
				      label="操作"
				      width="100">
				      <template slot-scope="scope">
				      	<!-- 弹窗 --> 
						<el-popover  ref="popover" placement="left" width="600" trigger="click" class="demo-input-suffix">
						 <el-form :inline="false" :model="wareHouseVO2" label-width="80px"  ref="wareHouseVO2" label-position="right" size="small" >
							<el-form-item label="阀值设定" prop="warningValue">
								<el-col :span="15">
		  							<el-input placeholder="请输入商品阀值" v-model="scope.row.warningValue"></el-input>
		  						</el-col>
							</el-form-item>
							<el-form-item label="货位" prop="locationId" >
								<el-col :span="15">
		  							<el-select v-model="scope.row.locationId" placeholder="货位地址" @change="changeLocationValue">
								      <el-option v-for="lo in locations" :label="lo.locationName" :value="lo.id" :key="lo.id"></el-option>
								    </el-select>
		  						</el-col>
							</el-form-item>
		  				</el-form>
		  				<span class="dialog-footer">
							    <el-button size="mini" type="primary" @click="updateForm('wareHouseVO2',scope.row)">确定</el-button>
							    <el-button size="mini" type="primary" @click="closePopper(scope.row)">取消</el-button>
							</span>
						</el-popover>
				      
				        <el-button v-popover:popover type="text" size="small" @click="editForm(scope.row)">编辑</el-button>
				      </template>
				    </el-table-column>
			    
			  </el-table>
			</template>	
			<div class="pageContent">		
				<el-pagination
			      @size-change="handleSizeChange"
			      @current-change="handleCurrentChange"
			      :current-page="currentPage"
			      :page-sizes="[5,10]"
			      :page-size="pageSize"
			      layout="total, sizes, prev, pager, next, jumper"
			      :total="totalSize">
			    </el-pagination>
			</div>
		<!-- table end -->
	
	</div>

</body>
<script type="text/javascript" th:src="@{js/warehouse/goodLocation.js}"></script>
</html>